# compiler 
CC = gcc

# libraries we're linking against
LIBALIASES = -lGL -lGLU -lGLEW -lglut -lm -ljpeg

APPNAME = hw6

APPCODE = \
hw6.cxx \
bump.cxx \
raster.cxx \
raster-jpeg.cxx \

APPOBJS = $(APPCODE:.cxx=.o)

# silent running
.SILENT:

# make cxx into objects
%.o: %.cxx
	echo Compiling $< 
	$(CC) -c $<

################################
# build rules

all:
	echo
	make $(APPNAME)

# create program
$(APPNAME): $(APPOBJS)
	echo
	echo Building $(APPNAME) 
	$(CC) -o $(APPNAME) $(APPOBJS) $(LIBALIASES)
	echo Building Complete.

################################
# start a fresh build

tarball:
	tar -czf hw6.tar.gz *.h *.cxx *.glsl Makefile README TODO

clean:
	rm -f *.o $(APPNAME)
	echo Cleaned.
